Skip to content

test: fix cross-platform test compatibility - #9

Merged
colinjlacy merged 2 commits into
runtimeconditions:mainfrom
ThunderKhan:fix/windows-test-compatibility
Nov 21, 2026
Merged

colinjlacy merged 2 commits into
runtimeconditions:mainfrom
ThunderKhan:fix/windows-test-compatibility

Conversation

@ThunderKhan

Copy link
Copy Markdown
Member

Summary

Fix cross-platform test failures in the Python profiler caused by platform-dependent text encoding and filesystem path separators.

The changes are limited to test code and preserve existing profiler behavior.

Changes

  • Specify encoding="utf-8" when writing Python source fixtures to prevent decoding errors on systems with non-UTF-8 default encodings.
  • Normalize filesystem path separators in error-message assertions to support Windows (\) and Unix (/) paths.
  • Continue validating expected error messages, source filenames, line numbers, and column positions without changing production error formatting.

Validation

Tested locally on Windows 11 with Python 3.12.10.

Check Result
Before changes 101 passed, 18 failed
After changes 119 passed, 0 failed

Command executed:

python -m pytest -q -ra

Scope

Only two test files are modified:

  • tests/test_generated_binding_extraction.py
  • tests/test_installed_binding_discovery.py

No production code, dependencies, or public APIs are changed.

Follow-up

Windows coverage in the regular GitHub Actions test matrix will be addressed in a separate PR to help prevent future regressions.

@colinjlacy
colinjlacy merged commit 3c20752 into runtimeconditions:main Nov 21, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants